package com.pomelo.base.core.config;

import org.springframework.transaction.support.DefaultTransactionStatus;

/**
 * 事务状态，添加记录是那个数据源的
 *
 * @author biankudingcha
 * @date: 2021-07-23
 * @since 0.5.0
 */
public class PomeloTransactionStatus extends DefaultTransactionStatus {

    /**
     * 事务beanId
     */
    private String platformTransactionManagerBeanId;

    public PomeloTransactionStatus(Object transaction, boolean newTransaction, boolean newSynchronization,
            boolean readOnly, boolean debug, Object suspendedResources) {
        super(transaction, newTransaction, newSynchronization, readOnly, debug, suspendedResources);
    }

    /**
     * 获取事务beanId
     *
     * @return String
     */
    public String getPlatformTransactionManagerBeanId() {
        return platformTransactionManagerBeanId;
    }

    /**
     * 设置事务beanId
     *
     * @param platformTransactionManagerBeanId PlatformTransactionManagerBeanId
     */
    public void setPlatformTransactionManagerBeanId(String platformTransactionManagerBeanId) {
        this.platformTransactionManagerBeanId = platformTransactionManagerBeanId;
    }

}
